package com.chenxi.service.impl;

import com.chenxi.mapper.SysUserMapper;
import com.chenxi.model.SysUser;
import com.chenxi.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service("sysUserService")
public class SysUserServiceImpl implements ISysUserService{

    @Autowired
    private SysUserMapper userMapper;

    @Override
    @Cacheable(value = "oauthCache")
    public SysUser loadUserByUsername(String username) {
        return userMapper.findByUsername(username);
    }
}
